class Person:
    def __init__(self,name,age,weight):
        self.name = name
        self.age = age
        self.weight = weight

    def run(self):
        self.weight -= 0.5
        print(f"{self.name}跑步了，体重减少了0.5公斤 {self.weight}")

    def eat(self):
        self.weight += 1
        print(f"{self.name}吃大餐，体重增加了1公斤 {self.weight}")


elephant = Person('elephant',18,5)
tiger = Person('tiger',18,5)

elephant.eat()
tiger.run()

print('*' * 50)
print(dir(Person))  #查看内置方法
print('*' * 50)
print(dir(elephant))



class Dog:
    def __init__(self,name,color):
        self.name = name
        self.color = color

    def bark(self):
        pass

    def shark(self):
        pass




























